﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace iHub
{
    public partial class voucherdate : Form
    {
        private PayrollManager paym = new PayrollManager();
        private DateTime date;

        public voucherdate()
        {
            InitializeComponent();
            this.FormClosing += new FormClosingEventHandler(Date_Closing);
        }

        private void Date_Closing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                main.form.Enabled = true;
            }
        }

        private void selectdate_Click(object sender, EventArgs e)
        {
            date = startdate.Value;
            main.form.Enabled = true;
            main.form.setCVDate(date);
            this.Dispose();
        }
    }
}
